package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.StationDto;
import com.shensi.api.admin.domian.station.dto.SyncUserDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface StationSyncClient {

    @PostMapping("/syncStation/addStation/{timestamp}/{sign}")
    public AjaxResult add(@RequestBody StationDto station);


    @PostMapping("/syncStation/updateStation/{timestamp}/{sign}")
    public AjaxResult edit(@RequestBody StationDto station);

    /**
     * 获取油站信息详细信息
     */
    @GetMapping(value = "/syncStation/{stationId}/{timestamp}/{sign}")
    public AjaxResult getInfo(@PathVariable("stationId") Long stationId);
}
